 package com.zx.cloud.controller.client;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.domain.ClientLoanOrder;
import com.zx.cloud.domain.Dict;
import com.zx.cloud.domain.Edition;
import com.zx.cloud.domain.LianLianParam;
import com.zx.cloud.domain.LoanOrder;
import com.zx.cloud.domain.RepayOrder;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

/**
 * 
 * @ClassName: LoanClient
 * @Description: 
 * @author: likun
 * @date: 2017年11月1日 下午6:56:16
 */
@FeignClient(name = LoanClient.SERVICE_ID, fallback = LoanClientFallback.class)
public interface LoanClient {
	
    /**
     * eureka service name
     */
    String SERVICE_ID = "trade-provider";
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getDitRate", method = RequestMethod.POST)
    ObjectDataResponse<List<Dict>> getDitRate();
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getIosCheck", method = RequestMethod.POST)
	ObjectDataResponse<List<Dict>> getIosCheck();

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/createLoanOrder", method = RequestMethod.POST)
	ObjectDataResponse<Integer> createLoanOrder(LoanOrder loanOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getMyLoanOrderList", method = RequestMethod.POST)
	ObjectDataResponse<Page<LoanOrder>> getMyLoanOrderList(LoanOrder loanOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getLoanOrderDetail", method = RequestMethod.POST)
	ObjectDataResponse<LoanOrder> getLoanOrderDetail(LoanOrder loanOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/getRepayOrderDetail", method = RequestMethod.POST)
    ObjectDataResponse<RepayOrder> getRepayOrderDetail(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/app/getAppVersionToAndr", method = RequestMethod.POST)
    ObjectDataResponse<Edition> getAppVersionToAndr();
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/app/getAppVersionToIos", method = RequestMethod.POST)
    ObjectDataResponse<Edition> getAppVersionToIos();
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/getMyRepayOrderList", method = RequestMethod.POST)
	ObjectDataResponse<Page<RepayOrder>> getMyRepayOrderList(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/whetherCanLoan", method = RequestMethod.POST)
	ObjectDataResponse<Integer> whetherCanLoan(LoanOrder loanOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/saveTradeInfoByRepay", method = RequestMethod.POST)
	ObjectDataResponse<Integer> saveTradeInfoByRepay(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/getTradeNum", method = RequestMethod.POST)
	ObjectDataResponse<String> getTradeNum(RepayOrder repayOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/app/getLianLianParam", method = RequestMethod.POST)
	ObjectDataResponse<LianLianParam> getLianLianParam();

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getClientLoanOrder", method = RequestMethod.POST)
	ObjectDataResponse<ClientLoanOrder> getClientLoanOrder(ClientLoanOrder cLoanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/app/getPaymentSwitch", method = RequestMethod.POST)
	ObjectDataResponse<String> getPaymentSwitch();
    
	
}
